home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / makemdi2.zip / APP.H < prev    next >
C/C++ Source or Header  |  1992-11-25  |  2KB  |  72 lines

  1. #ifndef _INC_APP
  2. #define _INC_APP
  3. #pragma comment (user,"Compiled on " __DATE__ " at " __TIME__)
  4. // ==========================================================Purpose 
  5. // APP.H 
  6. // 
  7. // MAKEMDI adaptation of Windows 3.1 SDK MAKEAPP system. 
  8. // 
  9. // MDI application design based on Chapter 7 of     
  10. // "Windows 3: A Developer's Guide" by Jeffrey Richter. 
  11. // 
  12. // Adaptation developed with permission of the author by  
  13. // John F. Holliday, Technisoft Corporation 
  14. // Telephone: (515) 472-9803, CompuServe: 71271,634 
  15. //
  16. // [DMM]    25-Nov-1992: Fixed crashing on exit
  17. //            Also tabified file to tabsize of 4
  18. //
  19. //            David M. Miller, Business Visions, Inc.
  20. //            Telephone: (212) 747-6118
  21. //            CompuServe: 72676,327
  22. //            internet: dmiller@hera.sbi.com
  23. // ==========================================================Private 
  24.  
  25. typedef struct tagAPP {
  26.     MSG                msg;                // message buffer 
  27.     HINSTANCE        hinst;                // current instance handle 
  28.     HINSTANCE        hinstPrev;            // previous instance handle 
  29.     HANDLE            hAccelTable;        // Handle to active accelerator table. 
  30.     LPSTR            lpszCmdLine;        // command line arguments 
  31.     int                cmdShow;            // initial ShowWindow style 
  32.     HWND            hWndFrame;            // frame window handle 
  33.     char            szName[100];        // application name 
  34.     char            szBuf[255];            // scratch buffer 
  35.     char            szFmt[100];            // format buffer 
  36.     char            szCap[100];            // caption buffer 
  37. }                APP;
  38.  
  39.  
  40. BOOL            App_Initialize(APP * papp);
  41. int                App_Main(APP * papp);
  42. VOID            App_Terminate(APP * papp, BOOL fEndSession);
  43. BOOL            App_Idle(APP * papp);
  44.  
  45. //-Messages-------------------------------------------------------- 
  46.  
  47. #define FW_MDICHILDDESTROY      (WM_USER + 0)        // Frame messages 
  48. #define FW_RESIZEMDICLIENT      (WM_USER + 1)
  49. #define FW_GETSTATBARRECT      (WM_USER + 2)
  50. #define FW_SETMENUHELP          (WM_USER + 3)
  51. #define FW_GETMENUHELP          (WM_USER + 4)
  52. #define FW_DRAWSTATUSDIVIDE      (WM_USER + 5)
  53.  
  54. #define AW_PAINTMENUHELP      (WM_USER + 100)    // Application messages 
  55.  
  56.  
  57. #define AC_PAINTSTATBAR          (WM_USER + 200)    // MDI child messages 
  58.  
  59.  
  60.  
  61. //-----------------------------------------------------------Public 
  62.  
  63. int PASCAL        WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
  64.  
  65.  
  66. //----------------------------------------------------------Globals 
  67.  
  68. extern APP        g_app;
  69.  
  70. //--------------------------------------------------------------End 
  71. #endif                            // !_INC_APP 
  72.